package cn.lcl.test.po;

import cn.lcl.bean.po.Student;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by licho on 2017/8/18 0018.
 */
public class User {
    private String name="李崇林";
    private Integer age=20;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date birthday=new Date();//进行dateformate
    private List<Student> stus;
    {
        Student s=new Student();
        s.setSid(1L);
        s.setName("你好");
        s.setTime(new Timestamp(new Date().getTime()));
        s.setCid(3L);
        stus=new ArrayList<>();
        stus.add(s);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public List<Student> getStus() {
        return stus;
    }

    public void setStus(List<Student> stus) {
        this.stus = stus;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", birthday=" + birthday +
                ", stus=" + stus +
                '}';
    }
}
